<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--
@html_name: 21对象方法扩展
@description: The past cannot be redeemed, the future can be changed.
@author: Jason Black
@create: 2023/6/26 10:23:28
-->
<script>
    //1.Object.is判断两个值是否完全相等
    console.log(Object.is(123, 123))
    console.log(Object.is("123", 123))
    console.log(Object.is(NaN, NaN))
    console.log(NaN === NaN)

    //2.Object.assign对象的合并
    let o1 = {
        name: "Jason",
        age: 12,
        sex: "female"
    }
    let o2 = {
        salary: 20000,
        sex: "male",
        hobby: ['football', 'basketball']
    }

    console.log(o1)
    console.log(o2)
    console.log(Object.assign(o1, o2))
    //3.Object.setPrototypeof Object.getPrototypeof


</script>
</body>
</html>